
<%--
    Document   : addv030
    Created on : Jul 30, 2012, 3:14:19 PM
    Author     : ems
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>

<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../css/popup.css"/>
        <link rel="stylesheet" type="text/css" href="../css/report.css"/>
        <link rel="stylesheet" type="text/css" href="../css/jquery.fancybox-1.3.4.css"/>
        <link rel="stylesheet" type="text/css" href="../css/kapiform.css"/>
        <!--        <link rel="stylesheet" type="text/css" href="../css/paging.css"/>-->
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery-1.7.2.min.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/kapi.js"></script>
        
    </head>
    <script type="text/javascript"> 
        $j(document).ready(function(){
            // $j('.workRight2').hide();
            // $j('.history').click(function(){
            //     $j('.workRight2').slideToggle('slow');
            // });
            $j('.workRight2').hide();
            $j('.history').live('click',function(){
                $j('.workRight2').slideUp();  
                //  $j('.workRight2').html('');
                // alert($j(this).next().attr('class'));
                if($j(this).next().hasClass('active')){
                
                    $j('.workRight2').removeClass('active');
                }else{

                    $j('.workRight2').removeClass('active');
                    $j(this).next().addClass('active');
                    //$j(this).next().slideToggle();
                    $j(this).next().slideDown();
                }
                    
                // $j(this).next().slideUp();
                    
            });
        });
    </script>
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){


            //validateform("form-input-customer");
        });

    </script>
    <script type="text/javascript">
        var open_cur = 0;
        $j = jQuery.noConflict();
        $j(document).ready(function(){

            $j('.keysearch').live('keyup',function(){
                $j('.rich-table-row').hide();
                $j('.rich-table-row').each(function(){
                    html = $j(this).html();
                    // alert( ununicode(html));  || html.indexOf( $j('.keysearch').val()) > -1
                    if(   html.indexOf( $j('.keysearch').val()) > -1    )  {
                        $j(this).show();
                    }else{
                        $j(this).hide();
                    }

                });
            });
            $j(".rich-table-row:odd").addClass("odd");

        });


    </script>
    <style type="text/css">

        .rich-table-subheadercell{
            background:  none repeat scroll 0 0 #4884B5;
        }
        .rich-table-subheadercell div {
            color: white !important;
            font-weight: bold;
        }
        .odd{
            background: #E0EFFC;
        }
        .form_item_content .workLeft2{
            border: 1px solid #7F9FBE;
            float: left;
            height: auto;
            margin-left: 21px;
            width: 103px;
        }

        .form_item_content .workRight2{
            border: 1px solid #E6E9EB;
            float: left;
            height: auto;
            margin-left: 20px;
            width: 94%;
        }

        .form_item_content .workLeft2 label{
            color: blue;
            font-weight: bold;
            margin-left: 2px;
        }

        .form_item_content .workRight2 label{
            float: left;
            margin-left: 0px;
            margin-top: 5px;
            text-align: left !important;
            width: 6%;
        }

        .form_item_content .workRight2 p{
            float: left;
            margin-top: 4px;
            margin-left: -7px;
        }

        .form_item_content .workLeft{
            border: 1px solid #7F9FBE;
            float: left;
            height: auto;
            margin-left: 21px;
            width: 103px;
        }
        .form_item_content .workRight_L{
            border: 1px solid #7F9FBE;
            float: left;
            height: 0;
            margin-left: 21px;
            margin-top: 4px;
            width: 93.5%;

        }
        .form_item_content .workRight_L label{
            margin-left: 5px;
        }

        .form_item_content .workLeft label{
            color: blue;
            font-weight: bold;
            margin-left: 2px;
        }

        .form_item_content .workRight{
            border: 1px solid #7F9FBE;
            float: left;
            height: 45px;
            width: 79%;
            margin-left: 5px;
        }

        .form_item_content .workRight label{
            float: left;
            margin-left: 5px;
            margin-top: 5px;
            text-align: left !important;
            width: 595px;
        }


        .form_item_content .history{
            border: 1px solid #E6E9EB;
            float: left;
            margin-left: 20px;
            width: 94%;
        }
        .form_item_content .history label{
            color: #5B7186;
            font-weight: bold;
            font-size: 12px;
            margin-left: 5px;
            text-align: right !important;
        }

        .rich-table{
            margin-left: 20px !important;
        }
        .rich-table-cell p
        {
            height: 0 !important;
            margin-top: -8px;
            position: relative;
        }


    </style>
    <f:view>
        <a4j:form id="form-input-customer" >
            <body style=" float:left; width:auto; height:auto; margin:0px;overflow: hidden;">
                <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
                <h:inputHidden id="pc300" value="#{c300Controller.PC300}" />
                <h:inputHidden id="fc150" value="#{c300Controller.FC150}" />
                <h:inputHidden id="fn600" value="#{c300Controller.FN600}" />
                <h:inputHidden id="fc500" value="#{c300Controller.FC500}" />
                <h:inputHidden id="CN315" value="#{c300Controller.CN315}" />
                <h:inputHidden id="fis" value="#{c300Controller.fis}"/>
                <div class="popup" style="height:460px; width:760px;background:white;margin-top:13px; margin-right: 12px ">
                    <div class="popup-header">
                        <div class="title"><h:outputText value="#{locale.job_detail}"/></div>
                        <div style=" position: fixed; float:left; height:50px;width:50px;left:708px;">
                            <a id="fancybox-close" onclick="reloadProject()"  style="display: block; float:left;"></a>
                        </div>
                    </div>
                    <div class="popup-content">
                        <div class="main_content">

                            <div class="div_menu_header">
                                <div class="menu-header"><a href="workReport.jsp?action=edit&CN315=<h:outputText value="#{c300Controller.CN315}" />&fis=<h:outputText value="#{c300Controller.fis}" />&FN600=<h:outputText value="#{c300Controller.FN600}" />&FC500=<h:outputText value="#{c300Controller.FC500}" />&FC150=<h:outputText value="#{c300Controller.FC150}" />&emp=<h:outputText value="#{c300Controller.emp}" />"><h:outputText value="#{locale.job}" /></a></div>
                                <div class="menu-header" style="display:<h:outputText rendered="#{c300Controller.fis !=0 && c300Controller.fis !=2}" value="none" />" > <a href="editReport.jsp?FN600=<h:outputText value="#{c300Controller.FN600}" />&CN315=<h:outputText value="#{c300Controller.CN315}" />&fis=<h:outputText value="#{c300Controller.fis}" />&FC500=<h:outputText value="#{c300Controller.FC500}" />&FC150=<h:outputText value="#{c300Controller.FC150}" />&emp=<h:outputText value="#{c300Controller.emp}" />" ><h:outputText value="#{locale.report}" /></a></div>
                                <div class="menu-header" style="background:white; height:30px;color:black"><h:outputText value="#{locale.history}" /></div>
                                <div class="menu-header" ><a href="documentReport.jsp?FN600=<h:outputText value="#{c300Controller.FN600}" />&CN315=<h:outputText value="#{c300Controller.CN315}" />&fis=<h:outputText value="#{c300Controller.fis}" />&FC500=<h:outputText value="#{c300Controller.FC500}" />&FC150=<h:outputText value="#{c300Controller.FC150}" />&emp=<h:outputText value="#{c300Controller.emp}" />"><h:outputText value="#{locale.document}" /></a></div>
                            </div>
                            <%--     <a4j:repeat value="#{c300Controller.listC300ByID}" var="item"> --%>
                            <div class="form_item_content" style="margin-top:5px;margin-left: -1px;">

                                <%--  <div class="workLeft">
                                      <label>Nội dung báo cáo:</label>
                                      <label>Ngày & giờ: <h:outputText value="#{item.cl346}"/></label>
                                  </div>
                                  <div class="workRight">
                                      <label><span style="font-weight: bold">Mô tả <h:outputText value="#{item.cb317}"/></label>
                                  </div>
                                

                                    <div class="history"><label>Nội dung báo cáo <label>Ngày & giờ: <h:outputText value="#{item.cl346}"/></label> </label></div>
                                    <div class="workRight2">
                                        <label>Mô tả:</label>
                                        <h:outputText style="font-size:14px;" value="#{item.cb317}" escape="false"/>
                                    </div>
                                --%>
                                <div style="height:326px ; width:100%; "> 
                                    <rich:dataTable value="#{c300Controller.listC300ByID}" var="cus"
                                                    width="720px; " columnClasses=",columns,columns,columns" rows="8" rowKeyVar="row"
                                                    id="table" styleClass="machinePosDataTable">

                                        <rich:column style="width:20px; text-align:center">
                                            <f:facet name="header">
                                                <h:outputText value="STT" />
                                            </f:facet>
                                            <div style="width:20px; ">
                                                <h:outputText value="#{row+1}" />
                                            </div>
                                        </rich:column>
                                        <rich:column style="width:98px;height: 20px">
                                            <f:facet name="header">
                                                <h:outputText value="#{locale.date_time}" />
                                            </f:facet>
                                            <div style="width:98px; height: 20px; margin-left:5px;">
                                                <h:outputText value="#{cus.cl346}" />
                                            </div>
                                        </rich:column>
                                        <rich:column style="width:auto;">
                                            <f:facet name="header">
                                                <h:outputText value="#{locale.description}" />
                                            </f:facet>
                                            <div style="width:auto;">
                                                <h:outputText value="#{cus.cb317}" escape="false" />
                                            </div>
                                        </rich:column>
                                        <rich:column width="50px">
                                            <f:facet name="header">
                                                <h:outputText value="Hoàn thành" />
                                            </f:facet>

                                            <div style="width:50px; text-align: center">
                                                <h:outputText value="#{cus.cn315}%" />
                                            </div>
                                        </rich:column>
                                        <rich:column width="120px">
                                            <f:facet name="header">
                                                <h:outputText value="#{locale.employee}" />
                                            </f:facet>

                                            <div style="width:120px;">
                                                <h:outputText value="#{cus.hoten}" />
                                            </div>
                                        </rich:column>

                                        <f:facet name="footer">
                                            <rich:datascroller id="ds" for="table"></rich:datascroller>
                                        </f:facet>
                                    </rich:dataTable>
                                </div>




                            </div>
                            <%--    </a4j:repeat> --%>
                            <div class="alert"></div>
                        </div>

                    </div>

                    <div class="popup-footer">

                        <div class="buttonsave buttonReload" onclick="reloadProject()"  lang="<h:outputText value="#{c300Controller.emp}&fis=#{c300Controller.fis}"/>"><span><h:outputText value="#{locale.close}" /></span></div>

                        <rich:modalPanel id="ajaxLoadingModalBox" minHeight="30" minWidth="40"
                                         height="30" width="40" zindex="2000">
                            <h:outputText value="#{locale.please_wait}" styleClass="startDummer"></h:outputText>
                        </rich:modalPanel>

                    </div>

                </div>
            </body>
        </a4j:form>
    </f:view>
</html>
<script type="text/javascript">
    $j(document).ready(function(){
        yhight = ($j('.popup').height()-90)+"px" ;
        $j('.main_content').css('height',yhight );
        $j('.popup-content').css('height',yhight );
    });
    function reloadProject(){
        // self.parent.tb_remove();
        emp =  $j('.buttonReload').attr('lang');
        window.parent.location.href="project.jsp?action=loadproject&emp="+emp;
    }
</script>



